function densityFunctionPlot(x)
   ndist = textread('ndist.txt');
   len = size(ndist,1);
   border = length(x);
   y = zeros(size(x));
   for i = 1:len
       u = ndist(i,1);
       %sigma = ndist(i,2);
       sigma = 1;
       %sigma = ndist(i,1)/30;
       %sigma = 5;
       for j = 1:border
          y(j) = y(j) +  (1/(sqrt(2*pi)*sigma))*exp(-(x(j)-u)^2/(2*sigma^2)); 
       end
   end
   z = trapz(x,y);
   % display(y);
   hold on;
   xlabel('angle');
   ylabel('probability');
   title('density function');
   global fv;
   fv = y/z;
   plot(x,y/z,'k','linewidth',1.5);
   
end